<script lang="ts" setup>
  const props = defineProps<{
    id: string
  }>()
</script>

<template>
  <!-- 这是一个 WebGL canvas 顶级组件 -->
  <div class="webgl-layout">
    <canvas :id="props.id" class="webgl-canvas"></canvas>
  </div>
</template>

<style lang="scss" scoped>
.webgl-layout {
  width: 100%;
  height: 100%;
  overflow: hidden;
  .webgl-canvas {
    width: 100%;
    height: 100%;
    background: #f4f4f4;
  }
}
</style>